Image edge extraction via fuzzy reasoning

ABSTRACT

A computer-based technique for detecting edges in gray level digital images employs fuzzy reasoning to analyze whether each pixel in an image is likely on an edge. The image is analyzed on a pixel-by-pixel basis by analyzing gradient levels of pixels in a square window surrounding the pixel being analyzed. An edge path passing through the pixel having the greatest intensity gradient is used as input to a fuzzy membership function, which employs fuzzy singletons and inference rules to assigns a new gray level value to the pixel that is related to the pixel&#39;s edginess degree.

ORIGIN OF THE INVENTION

The invention described herein was made in the performance of work undera NASA contract and is subject to the provisions of Public Law 96-517(35 U.S.C. § 202) in which the contractor has elected not to retaintitle.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to an application entitled OptimalBinarization of Gray-Scaled Images Via Fuzzy Reasoning, which iscommonly owned with the subject application and is to be filed underSer. No. 10/779/551.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in general to a method and system fordetecting edges in digital images in which fuzzy reasoning is employedto determine the degree to which each pixel in an image represents anedge.

2. Description of the Background Art

Accurate detection in images of edges, which contain the most importantinformation, is vital to performing advanced image processing andanalysis. Unfortunately, images of real scenes frequently contain datathat is ambiguous and incomplete. As a result, the problem ofdetermining what is and what is not an edge is confounded by the factthat edges are very often partially hidden or distorted by variouseffects such as uneven lighting and image acquisition noise.Furthermore, images frequently contain data with edge-likecharacteristics, but a confident classification of this data can be bestsolved when high-level constraints are imposed on the interpretation ofan image.

Most known edge detector techniques require the selection of parameters(e.g. thresholds in gradient edge detectors, thresholds in Laplacianedge detectors, and s in Laplacian of Gaussian edge detectors) when noinformation about the images is known in advance. Edge detection basedon mathematical models can only detect specific kinds of noticeableedges. For example, an optimal mathematical-model-based step edgedetector can be ineffective for ramp edges. Moreover, the parameters insome of the mathematical models are difficult to determine when littleinformation about the image is known.

Human beings, on the other hand, are able to make some sense of evenunfamiliar objects, which necessarily have an imperfect high-levelrepresentation. To perceive unfamiliar objects, or to perceive familiarobjects with imperfect images, it appears that humans apply heuristicalgorithms to understand such images. Although these algorithms may be“implemented” in the wetware of the human vision system, it is feasibleto believe that it is possible to characterize an equivalent processsystematically. One would therefore suspect that a system that employshuman like heuristic algorithms would be particularly suited for imageedge detection considering the indeterminate nature of edge detectiondata. Such a system may well be found to out perform other, mathematicalbased edge detection techniques.

SUMMARY OF THE INVENTION

The present invention provides such a heuristic algorithm basedtechnique for image edge detection that has in fact been shown tooutperform previous mathematical based edge detection techniques. Moreparticularly, the technique employs fuzzy reasoning, which is a suitableframework for expressing heuristic processes applied to incomplete andimperfect image data. With fuzzy reasoning, the edge detection techniqueis completely adaptive with no need for selecting parameters. The use offuzzy reasoning with the power to model and respond usefully toapproximate situations is ideally suited to edge detection because thenature of the data is indeterminate at a low-level stage of processing.

In the specific method of the present invention, a multiple pixeldigital image is analyzed for edges on a pixel-by-pixel basis. That is,each pixel in the image is analyzed to determine the degree to which itrepresents a part of an edge in the image. The analysis relies on thefact that if a pixel is on an edge, then that edge will extend in somedirection away from the pixel and pixels on either side of the edge willlikely have gray values that differ substantially from one another. Forexample, if predominantly dark, low valued pixels are on one side of theedge, predominantly light or high valued pixels will likely be on theopposite side of the edge.

With the foregoing in mind, the method of the present invention beginsedge analysis of a pixel in the image by identifying an edge pathrunning through the pixel and determining the intensity gradient oneither side of the edge. To do this, a square n×n pixel window (n beingan odd number greater or equal to 3) is preferably used with the pixelto be analyzed being located at the center of the window. There are fourpossible edge paths through the center pixel: horizontal, vertical andtwo 45 degree diagonals. Each one of these edge paths splits the n×npixel window into two regions, each holding an equal number of pixels.

In the preferred embodiment, the average change of gray levels acrosseach one of the four edge paths is computed and the edge path with thegreatest change of gray levels is chosen to be used as a dimensionlessinput to a fuzzy membership function. The linguistic values (or labels)used for the average change of gray levels are those one heuristicallymight use: Small, Medium and Large. The output variable is the degree ofedginess that the central pixel in the window has based on the intensitygradient value and is preferably evaluated using a known inferencemethod referred to as the Truth Value Flow Inference (TVFI) method thatuses singletons instead of fuzzy sets as used in the widely-used Mandinimethod. The linguistic variables (or labels) of the output value arealso those one heuristically might use: Edge, Mild edge and No Edge.Simple inference rules are then used to express the dependency betweenthe input and output values. If the grayness change is small, then thecentral pixel is No Edge; if the grayness change is Medium, then thecentral pixel is a Mild Edge; and, if the grayness change is Large, thenthe central pixel is Edge. A value between 0.0 and 1.0 is thus assignedto each of these three characteristics, which values represent thedegree to which the pixel is an Edge, a Mild Edge or No Edge.

The final step of the method is defuzzification where the threecharacteristic output values for the selected edge path are combinedusing an averaging method to determine the crisp output value for thecentral pixel. Preferably, the averaging method is either an averagingunion of truncated output singletons (TVFI method) or a centroidaveraging process (Mandini method). The final output value of thecentral pixel is generated by multiplying the full grayness level andits respective edginess degree, which results in assignment of a newgray level value to the pixel that is directly proportional to thepixel's edginess degree. The foregoing process is then repeated for allother possible windows until each pixel in the image has beencharacterized based on edginess.

BRIEF DESCRIPTION OF THE DRAWINGS

The features and advantages of the present invention will becomeapparent from the following detailed description of a preferredembodiment thereof, taken in conjunction with the accompanying drawings,in which:

FIG. 1 is a block diagram of a computer system that can be employed fordetecting edges in digital images using a fuzzy reasoning basedalgorithm in accordance with the preferred embodiment of the presentinvention;

FIG. 2 is a flowchart showing the steps carried out by the edgedetection algorithm of the preferred embodiment;

FIG. 3 is a schematic illustration of a 3×3 pixel window that isemployed in the edge detection algorithm of the preferred embodiment toidentify an edge passing through a pixel in an image having a maximumintensity gradient from one side of the edge to the opposite side of theedge;

FIG. 4 is graph illustrating an input fuzzy membership function employedin the edge detection algorithm of the preferred embodiment;

FIG. 5 is a graph illustrating an output fuzzy membership function thatis employed in the edge detection algorithm of the preferred embodiment;

FIG. 6 is a graph illustrating how an input value is employed by theinput membership function to determine the singleton values (TVFImethod) on the respective output membership value;

FIG. 7 is a graph illustrating how the final crisp output value isgenerated based on the singleton output values shown in FIG. 6;

FIG. 8 is a gray-scale image to be analyzed for edges in accordance withthe preferred embodiment;

FIG. 9 is an output from a first prior art edge detector algorithm ofthe image of FIG. 8;

FIG. 10 is an output from a second prior art edge detector algorithm ofthe image of FIG. 8; and

FIG. 11 is an output from the edge detector algorithm of the preferredembodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference to FIG. 1, a computer system 10 is illustrated whichincludes a processor 12 that is interfaced to an operating memory 14 anda storage memory 16, as is conventional. Loaded into the operatingmemory 14 is an edge detection software application or module 18 that isdesigned to detect edges in multiple bit digital images using fuzzyreasoning in accordance with a preferred embodiment of the presentinvention. The computer system 10 can be implemented using anyconventional PC, for example, but other computer systems can be employedas well.

Multiple pixel digital images to be analyzed for edges are eitherretrieved from the storage memory 16 or from an external image source 20and are fed into the edge detection application 18 for analysis with anedge detection algorithm. In the specific method of the presentinvention, a multiple pixel digital image is analyzed for edges on apixel-by-pixel basis. That is, each pixel in the image is analyzed todetermine the degree to which the pixel likely represents a part of anedge in the image. The analysis relies on the fact that if a pixel is onan edge, then that edge will extend in some direction away from thepixel and pixels on either side of the edge will likely have gray valuesthat differ substantially from one another. For example, ifpredominantly dark, low valued pixels are on one side of the edge,predominantly light or high valued pixels will likely be on the oppositeside of the edge.

With the foregoing in mind and with reference to the flowchart of FIG.2, the algorithm of the present invention begins edge analysis of apixel in the image at step 100 by identifying an edge path runningthrough the pixel and calculating a pixel intensity gradient on eitherside of the edge path. To do this, a square n×n pixel window (n being anodd number greater or equal to 3) is used with the pixel to be analyzedbeing located at the center of the window. FIG. 3 illustrates such a 3×3pixel window W with a plurality of pixels P and a center pixel CP. Then×n pixels P are arbitrary labeled (i, j) where i is the window's rownumber (i=0, 1, 2 , , , n−1) and j is the window's column number (j=0,1, 2, , , , n−1). Since n is an odd number, the center pixel CP islocated at x, y coordinates i=(n−1)/2 and j=(n−1)/2.

It should be noted that the use of the window W means that some pixelsalong the borders of the image will not be analyzed since they cannot besurrounded by a window. However, this is of little consequence since theoutside edges of the image are not typically of interest in an edgedetection analysis. For example, a 3×3 window would leave a 1-pixelimage margin without edge grade evaluation while a 5×5 window wouldgenerate a 2-pixel margin.

As also illustrated in FIG. 3, there are four possible edge paths EPthrough the center pixel: horizontal, vertical and two 45 degreediagonals. Each one of these edge paths splits the n×n pixel window Winto two regions, each holding an equal number of pixels. In thepreferred embodiment, the average change or gradient of gray levelsacross each one of the four edge paths is then computed and the edgepath with the greatest change of gray levels S_(max) is chosen to beused as a dimensionless input to a fuzzy membership function. If an 8bit gray scale is employed a gray gradient value between 0 and 255 isgenerated; S_(max) will be a dimensionless number between 0 and 1 as itis generated by dividing the gray gradient value by 255, the highestpossible gray gradient value. It should be noted that while it ispreferred to compare the intensity gradients of all four possible edgepaths, any lesser number of the paths could be analyzed if desired,though this would likely diminish the accuracy of the edge detectionprocess.

The next step 102 of the process is called fuzzification. This stepinvolves entry of S_(max) into a fuzzy membership function asillustrated in FIG. 4, which shows the input membership function for aplurality of input linguistic values or characteristics that areassociated with the dimensionless gray level gradient value, S_(max). Inthe preferred embodiment, the input linguistic values (or labels) usedfor the average change of gray levels are those one heuristically mightuse: Small, Medium and Large. Thus, the graph of FIG. 4 shows the pixelgradient change S_(max) as a function of the degree, from 0.0 to 1.0,that the magnitude of S_(max) is characterized as Small, Medium andLarge. The membership function therefore converts the single input intothree input values, one for each label.

The next step 104 implemented by the edge detection algorithm isreferred to as rule evaluation in which each of the input valuesgenerated by the input membership function is applied to an outputmembership function. FIG. 5 illustrates the output membership functionin which inference rules are applied to the values obtained from theinput membership function. The output variable μ_(e) is the degree ofedginess that the central pixel in the window has based on the intensitygradient value and is preferably evaluated using a known inferencemethod referred to as the Truth Value Flow Inference (TVFI) method thatuse singletons. Other more computation intensive inference methods, suchas the well-known Mandani inference method, can be used, but the TVFImethod is preferred for its simplicity that leads to a much less CPUdemanding approach. The linguistic variables (or labels) of the outputvalue are also those one heuristically might use: Edge, Mild Edge and NoEdge. Simple inference rules are then used to express the dependencybetween the input and output values. Every input value goes through therules to lead to its respective output value holding three weight valuesfor each one of the output adjectives (Edge, Mild Edge and No Edge). Itshould be noted that the sum of these weight values does not have toequal 1.0 as fuzzy reasoning is not the same as probability.

The inference rules are as follows:

1) If the grayness change is Small, then the central pixel is No Edge;

2) if the grayness change is Medium, then the central pixel is MildEdge; and,

3) if the grayness change is Large, then the central pixel is Edge.

Thus, for each pixel, the inference rules will result in threecharacteristic output values, each between 0.0 and 1.0, that representthe degree to which the pixel is No Edge, Mild Edge and Edge,respectively.

The graph of FIG. 6 illustrates the application of the inference ruleson both the input and output membership functions that yield the finalset of truncated singleton values. In the example of FIG. 6, the inputvalue 0.2 leads to input adjective weight values of 0.25, 0.35, and 0.8for Large, Medium and Small respectively; these adjective weight valuesand the set of rules yield the truncated output singleton values 0.25,0.35, and 0.8 for the adjectives Edge, Mild and No Edge respectively.

Once the truncated singleton values have been determined, the final step106 of the method is defuzzification where the three characteristicoutput values for the selected edge path are combined using an averagingunion of singletons (TVFI method) or a centroid averaging (Mandinimethod) to determine a crisp output value for the central pixel. Moreparticularly, the defuzzification process takes the union of thetruncated singleton values illustrated in FIG. 6, and then takes theirweighted average to generate a crisp output value of 0.71 as shown inFIG. 7. In contrast with the Mandini method, the TVFI method does notneed to determine the centroid of the resultant fuzzy set. The finaloutput value of the central pixel is generated by multiplying the fullgrayness level (255 for 8-bit gray-scaled images) and its respectiveedginess degree (a number between 0.0 and 1.0). This results inassignment of a new gray level value to the pixel that is directlyproportional to the pixels' edginess degree. The algorithm then queriesat step 108 whether all pixel windows have been evaluated. If not, thealgorithm selects the next pixel at step 110 and returns to step 100 torepeat the foregoing process until each pixel in the image has beencharacterized based on its degree of edginess. Once all pixels have beencharacterized, the application is done at step 112.

To test the effectiveness of the subject edge detection technique, theimage of a compact disc (CD) shown in FIG. 8 was used as input andanalyzed using two prior art, mathematical based edge detectionalgorithms and the algorithm of the subject invention. FIGS. 9 and 10show edge detection results generated by the prior art algorithms, knownas Sobel and Prewit, respectively, while FIG. 11 shows the edgedetection generated by the fuzzy reasoning algorithm of the subjectinvention. As the images show, the edge detection performance based onfuzzy reasoning widely supersedes those based on the prior artmathematical algorithms. For example, tiny edges are not detected by theprior art algorithms. There is a dark spot with tiny edges close to thecenter of the CD, and the fuzzy reasoning based algorithm of the subjectinvention clearly both detects and identifies it, while the prior arttechniques fail to even detect it. Numbers and marks on the CD are alsomuch clearer using the subject fuzzy reasoning edge detector.

Although the invention has been disclosed in terms of a preferredembodiment, and variations thereon, it will be understood that numerousother modifications and variations could be made thereto withoutdeparting from the scope of the invention as set forth in the followingclaims.

1. A computer-based method for detecting one or more edges in a multiplepixel digital image comprising the steps of: loading a multiple pixeldigital gray scale image to be analyzed from an external source ofimages into an operating memory of a computer; analyzing said image foredges with an image edge detection application run by said computer,said application comprising the steps of: 1) selecting a pixel in saidimage to be analyzed; 2) identifying a plurality of potential edge pathswhich pass through said selected pixel; 3) calculating an average pixelintensity gradient value for each of said edge paths by comparing a graylevel intensity of pixels on one side of each of said edge paths to agray level intensity of pixels on an opposite side of each of said edgepaths; 4) selecting the greatest of said average pixel intensitygradient values of said edge paths as an input to a single fuzzymembership function and generating with said function, a plurality ofoutput values that are related to a degree to which said pixelrepresents an edge in said image; 5) combining said plurality of outputvalues using a weighted averaging analysis comprising an averaging unionof truncated output singletons to assign a crisp edginess value to saidpixel; 6) assigning a new edginess based gray level value to said pixelby multiplying an original gray level value of said selected pixel bysaid crisp edginess value, said new edginess based gray level valuebeing proportional to an edginess degree of said selected pixel; and 7)repeating steps (1)-(6) for additional pixels in said image.
 2. Thecomputer-based method of claim 1, wherein four edge paths are identifiedthat pass through said pixel.
 3. The computer-based method of claim 1,wherein said average pixel intensity gradient value for each of saidedge paths is calculated by: selecting an n×n pixel window, where n isan odd number greater than or equal to 3 and said pixel to be analyzedis located at a center of said window; calculating a first, averagepixel intensity value of pixels in said window on a first side of saidedge path; calculating a second, average pixel intensity value of pixelsin said window on a second, opposite side of said edge path; and,calculating a difference between said first and second values to obtainsaid average pixel intensity gradient value.
 4. The computer-basedmethod of claim 1, wherein said step of generating a plurality of outputvalues with said single membership function comprises: employing aninput membership function to generate a plurality of input valuesrelating said average pixel intensity gradient value to a plurality ofdegrees of intensity; applying a plurality of inference rules in anoutput membership function that relate the plurality of intensitydegrees to a corresponding plurality of edginess degrees and therebygenerate said plurality of output values.
 5. The computer-based methodof claim 4, wherein three of said input values, three of said inferencerules and three of said output values are employed; said input valuesbeing small, medium and large; said output values being no edge, mildedge and edge; and said inference rules being if the average pixelintensity gradient value is small, the pixel is not an edge; if theaverage pixel intensity gradient value is medium, the pixel is a mildedge; and, if the average pixel intensity gradient value is large, thepixel is an edge.
 6. A computer-based method for detecting one or moreedges in a multiple pixel digital image comprising the steps of: loadinga multiple pixel digital gray scale image to be analyzed from anexternal source of images into an operating memory of a computer;analyzing said image for edges with an image edge detection applicationrun by said computer, said application comprising the steps of: 1)selecting a pixel in said image to be analyzed; 2) selecting an n×npixel window, where n is an odd number greater than or equal to 3 andsaid window includes a center pixel, wherein said center pixel is saidpixel to be analyzed; 3) identifying a plurality of edge paths that runthrough said center pixel and divide said window into first and secondgroups of pixels; 4) for each of said edge paths, calculating a first,average pixel intensity value of pixels in said first group and asecond, average pixel intensity value of pixels in said second group;and, calculating a difference between said first and second values toobtain an average pixel intensity gradient value for each said edgepath; 5) selecting the greatest of said average pixel intensity gradientvalues as an input to a single fuzzy membership function to generate aplurality of input values relating said average pixel intensity gradientvalue to a plurality of degrees of intensity; 6) applying a plurality ofinference rules in an output membership function that relate theplurality of intensity degrees to a corresponding plurality of edginessdegrees and generate a plurality of output values that are related to adegree to which said center pixel represents an edge in said image; 7)combining said plurality of output values using a weighted averaginganalysis comprising an averaging union of truncated output singletons toassign a crisp edginess value to said center pixel; 8) assigning a newedginess based gray level value to said pixel by multiplying an originalgray level value of said selected pixel by said crisp edginess value,said new edginess based gray level value being proportional to anedginess degree of said selected pixel; and, 9) repeating steps (1)-(8)for additional pixels in said image.
 7. The computer-based method ofclaim 6, wherein four edge paths are identified that pass through saidpixel.
 8. The computer-based method of claim 6, wherein three of saidinput values, three of said inference rules and three of said outputvalues are employed; said input values being small, medium and large;said output values being no edge, mild edge and edge; and said inferencerules being if the average pixel intensity gradient value is small, thepixel is not an edge; if the average pixel intensity gradient value ismedium, the pixel is a mild edge; and, if the average pixel intensitygradient value is large, the pixel is an edge.
 9. A computer system fordetecting one or more edges in a multiple pixel digital imagecomprising: a processor; an operating memory interfaced to and readableby said processor; an external source of multiple pixel digital grayscale images to be analyzed for edges; and an image edge detectionapplication embodied in said operating memory and executable by saidprocessor for performing process steps for retrieving a multiple pixelgray scale digital image from said external source and detecting edgesin said image, said process steps comprising the steps of: 1) retrievingan image to be analyzed from said source of images; 2) selecting a pixelin said image to be analyzed; 3) identifying a plurality of edge pathswhich pass through said selected pixel; 4) calculating an average pixelintensity gradient value for each of said edge paths by comparing a graylevel intensity of pixels on one side of each of said edge paths to agray level intensity of pixels on an opposite side of each of said edgepaths; 5) selecting the greatest of said average pixel intensitygradient values of said edge paths as an input to a single fuzzymembership function and generating with said function, a plurality ofoutput values that are related to a degree to which said pixelrepresents an edge in said image; 6) combining said plurality of outputvalues using a weighted averaging analysis comprising an averaging unionof truncated output singletons to assign a crisp edginess value to saidpixel; 7) assigning a new edginess based gray level value to said pixelby multiplying an original gray level value of said selected pixel bysaid crisp edginess value, said new edginess based gray level valuebeing proportional to an edginess degree of said selected pixel; and, 8)repeating steps (2)-(7) for additional pixels in said image.
 10. Thecomputer system of claim 9, wherein said application identifies fouredge paths that pass through said pixel.
 11. The computer system ofclaim 9, wherein said application calculates said average pixelintensity gradient value by: selecting an n×n pixel window, where n isan odd number greater than or equal to 3 and said pixel to be analyzedis located at a center of said window; calculating a first, averagepixel intensity value of pixels in said window on a first side of saidedge path; calculating a second, average pixel intensity value of pixelsin said window on a second, opposite side of said edge path; and,calculating a difference between said first and second values to obtainsaid average pixel intensity gradient value.
 12. The computer system ofclaim 9, wherein said application carries out said step of generating aplurality of output values with said single membership function by:employing an input membership function to generate a plurality of inputvalues relating said average pixel intensity gradient value to aplurality of degrees of intensity; applying a plurality of inferencerules in an output membership function that relate the plurality ofintensity degrees to a corresponding plurality of edginess degrees andthereby generate said plurality of output values.
 13. The computer-basedmethod of claim 12, wherein three of said input values, three of saidinference rules and three of said output values are employed; said inputvalues being small, medium and large; said output values being no edge,mild edge and edge; and said inference rules being if the average pixelintensity gradient value is small, the pixel is not an edge; if theaverage pixel intensity gradient value is medium, the pixel is a mildedge; and, if the average pixel intensity gradient value is large, thepixel is an edge.
 14. A computer system for detecting one or more edgesin a multiple pixel digital image comprising: a processor; an operatingmemory interfaced to and readable by said processor; an external sourceof multiple pixel digital gray scale images to be analyzed for edges;and, an image edge detection application embodied in said operatingmemory and executable by said processor for performing process steps forretrieving a multiple pixel gray scale digital image from said externalsource and detecting edges in said image, said process steps comprisingthe steps of: 1) retrieving an image to be analyzed from said source ofimages; 2) selecting a pixel in said image to be analyzed; 3) selectingan n×n pixel window, where n is an odd number greater than or equal to 3and said window includes a center pixel, wherein said center pixel issaid pixel to be analyzed; 4) identifying a plurality of edge paths thatrun through said center pixel and divide said window into first andsecond groups of pixels; 5) for each of said edge paths, calculating afirst, average pixel intensity value of pixels in said first group and asecond, average pixel intensity value of pixels in said second group;and, calculating a difference between said first and second values toobtain an average pixel intensity gradient value for each said edgepath; 6) selecting the greatest of said average pixel intensity gradientvalues as an input to a single fuzzy membership function to generate aplurality of input values relating said average pixel intensity gradientvalue to a plurality of degrees of intensity; 7) applying a plurality ofinference rules in an output membership function that relate theplurality of intensity degrees to a corresponding plurality of edginessdegrees and generate a plurality of output values that are related to adegree to which said center pixel represents an edge in said image; 8)combining said plurality of output values using a weighted averaginganalysis comprising an averaging union of truncated output singletons toassign a crisp edginess value to said center pixel; 9) assigning a newedginess based gray level value to said pixel by multiplying an originalgray level value of said selected pixel by said crisp edginess value,said new edginess based gray level value being proportional to anedginess degree of said selected pixel; and, 10) repeating steps (2)-(9)for additional pixels in said image.
 15. The computer system of claim14, wherein said application identifies four edge paths that passthrough said pixel.
 16. The computer-based method of claim 14, whereinthree of said input values, three of said inference rules and three ofsaid output values are employed; said input values being small, mediumand large; said output values being no edge, mild edge and edge; andsaid inference rules being if the average pixel intensity gradient valueis small, the pixel is not an edge; if the average pixel intensitygradient value is medium, the pixel is a mild edge; and, if the averagepixel intensity gradient value is large, the pixel is an edge.